#ifndef _W3LD_H_
# define _W3LD_H_

#include <gr_graph_fun.h>
#include <LOGR_functions.h>
#include <LOGR_graph.h>
#include <pthread.h>

#include <gtk/gtk.h>
#include <bonobo.h>
#include <gnome.h>

#include "func_lexer.h"

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#define VERSION_MAJOR 0
#define VERSION_MINOR 0
#define VERSION_MICRO 1

#define LOG_BUFFER_SIZE 2048
#define RESOLVE_TIMEOUT_DEFAULT 3
#define GRAPH_WIDTH 1000
#define GRAPH_HEIGHT 1000

typedef struct _options {
	int port;
	char *base;
	char *prefix;
	char *domain;
} options;


typedef struct _global_frame {
	GraphFrame *graph;
	WebStatPtr webstat;
	func_tree_node *froot;
	LNode_type *watches;
	GtkWidget *textView;
} global_frame;

extern int parse_xml_text_graph(GraphFrame *gf, char *text, long len);
extern int process_log_line(char *bufline,WebStatPtr wsn,GraphFrame *gf,time_t *cdate, int *fdate);

void *w3ld(void *arg);

#endif
